
# 运算符

# 1. 算数运算符
# 2. 比较运算符

# 3. 赋值运算符
"""
a += b  <==>  a = a + b
a -= b  <==>  a = a - b
a *= b  <==>  a = a * b
a %= b  <==>  a = a % b
a /= b  <==>  a = a / b
a //= b  <==>  a = a // b
a **= b  <==>  a = a ** b
"""
a = 3
b = 7
a += b
print(a)
a %= b
print(a)

# 4. 逻辑运算符
"""
条件1 and 条件2 : 两个条件都满足返回真，否则返回假
条件1 or 条件2 ：两个条件满足其一返回真，否则返回假
not 条件 ：条件为真，加上not变为假，反之变为真
"""
n = 3
m = 11
print(n>2 and m<12)
print(n<2 and m<12)

print(n<2 or m<12)
print(n>2 or m>12)
print(n<2 or m>12)

print(not n>2)
print(not n<2)